package com.doyoo.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 定时任务-步骤
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "JobStep对象", description = "定时任务-步骤")
public class JobStep implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "自增id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "定时任务id")
    private Integer jobId;

    @NotNull(message = "'templateId'不能为空")
    @Schema(description = "步骤模板id")
    private Integer templateId;

    @NotNull(message = "'templateParameter'不能为空")
    @Schema(description = "步骤模板参数值")
    private String templateParameter;

    @Schema(description = "创建时间")
    @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
    private LocalDateTime updateTime;


}
